﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangePwd.aspx.cs" Inherits="BlogDH.User.ChangePwd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../Css/usercenter.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="container">
        <div class="header">
            <a href="">博客导航</a>
        </div>
        <div class="main">
            <div class="left">
                <ul>
                    <li><a href="index.aspx">个人信息</a></li>
                    <li><a href="javascript:void(0);">密码修改</a></li>
                    <li><a href="bloginfo.aspx">博客信息</a></li>
                </ul>
            </div>
            <div class="right">
                <form id="form1" action="ChangePwd.aspx" method="post">
                <p>
                    <label for="uname">
                        密码：</label>
                    <input type="password" id="oldpwd" name="oldpwd" /><span class="error" id="errPwd">
                        <%=errPwd %></span></p>
                <p>
                    <label for="uname">
                        新密码：</label>
                    <input type="password" id="newpwd" name="newpwd" maxlength="20" /></p>
                <p>
                    <label>
                        确认密码：</label>
                    <input type="password" id="repwd" name="repwd" /><span class="error" id="pwdErr">
                        <%=errRePwd %></span></p>
                <input type="submit" class="button" name="commit" value="保存" onclick=" return gosubmit()" />
                </form>
            </div>
        </div>
        <div class="footer">
        </div>
    </div>
    <script type="text/javascript">
        function gosubmit() {
            var ret = false;
            if (document.getElementById("newpwd").value != document.getElementById("repwd").value) {
                document.getElementById("errRePwd").innerHTML = "两次输入的密码不一致";
                ret = false;
            } else if (document.getElementById("newpwd").value.length == 0) {
                document.getElementById("errRePwd").innerHTML = "新密码不能为空";
            } else { ret = true; }
            return ret;
        }
    </script>
</body>
</html>
